import java.util.Arrays;

public class Leet1 {
        public static int[] twoSum(int[] nums, int target) {
            int[] r = {nums[0],nums[1]};
            for(int i = 0; i<nums.length-1; i++){
                for(int j = i+1;j<nums.length;j++){
                    System.out.println(nums[i]+"   "+nums[j]);
                    if(nums[i]+nums[j]==target){
                        r[0] = i;
                        r[1] = j;
                        return r;
                    }
                }
            }
            return r;
        }


    public static void main(String[] args) {
        int[] a = {3,2,4};
        int[] t = twoSum(a,6);
        System.out.println(Arrays.toString(t));
    }

}
